package com.scau.ums.service.imp.userInfo;

import com.scau.ums.mapper.TeacherMapper;
import com.scau.ums.model.Teacher;
import com.scau.ums.service.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherInfoImp implements UserInfo {

    @Autowired
    private TeacherMapper teacherMapper;

    public Teacher getUser(String teacherId){
        return teacherMapper.selectByPrimaryKey(teacherId);
    }

    @Override
    public List<Teacher> getAllUsers() {
        return teacherMapper.selectByExample(null);
    }
}
